package com.itheima.mall.service.pms;

import com.itheima.mall.api.pms.PmsProductAttributeServiceApi;
import com.itheima.mall.api.pms.PmsProductCategoryServiceApi;
import com.itheima.mall.pojo.pms.ProductCategory;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class PmsProductCategoryService {
    @DubboReference
    private PmsProductCategoryServiceApi pmsProductCategoryServiceApi;
    //添加商品分类
    public void create(ProductCategory productCategory) {
        //执行新增
        pmsProductCategoryServiceApi.create(productCategory);
    }

    //删除商品分类
    public void delete(ProductCategory productCategory, Long id) {
        //执行删除操作
        productCategory.setId(id);
        pmsProductCategoryServiceApi.delete(productCategory,id);
    }
}
